<template>
    <!-- <div class='' @click="item()"></div> -->
   
    <div>
       <button @click="set(obj)">
      常规按钮
    </button>
    </div>
</template>

<script>

export default {
    data() {
        return {
          obj:{
            item:'ggg',
            age:'18',
            sex:'第三性别',
            name:'邹洪阳'
          }
        };
    },
    created() {
       console.log(this.$store.state.item);
    },
    methods: {
      set(e){
        this.$store.commit('setitem',e )
        console.log(this.$store.state.item);
      }
    },
    components:{}
};
</script>

<style lang='scss'>

</style>
